Create relationship between tables 7


Create relationship between tables, to join all the tables into one single dataset (denormalize) to build Data Mart.

ยท      First check (follow GIF) whether source data have relationship by creating database diagram SSMS will automatically recognize relationship. Once you click on add for all tables in Database Diagram it will be clumsy you need to alter size of each table segregate them, that's when you will be able to view only one relationship between two tables.


ยท      If not recognized, we need to find relationship between tables.

ยท      Some tables donโ€™t have any relationship so, we ignored (tblUsers, Vendor and tblEmployee) and (tblBusinessUnitRegions and tblRegions these two tables holding same data, so we ignored one)

ยท      Totally 13 tables in that we will work on 9 tables to find Relationship by joining tables with matching columns. Download T-SQL query file and execute each batch of statements to check matching columns between tables.


OLTP vs OLAP Discussion Create relationship between tables 7


Create relationship between tables, to join all the tables into one single dataset (denormalize) to build Data Mart.

ยท      First check (follow GIF) whether source data have relationship by creating database diagram SSMS will automatically recognize relationship. Once you click on add for all tables in Database Diagram it will be clumsy you need to alter size of each table segregate them, that's when you will be able to view only one relationship between two tables.


ยท      If not recognized, we need to find relationship between tables.

ยท      Some tables donโ€™t have any relationship so, we ignored (tblUsers, Vendor and tblEmployee) and (tblBusinessUnitRegions and tblRegions these two tables holding same data, so we ignored one)

ยท      Totally 13 tables in that we will work on 9 tables to find Relationship by joining tables with matching columns. Download T-SQL query file and execute each batch of statements to check matching columns between tables.


OLTP vs OLAP Discussion